Menu box





By default, the menu box contains the 8 items shown in this figure. Some or all of these items may be missing if they were specifically excluded by using the 'Options' argument in the calling sequence. The name of each menu box item is chosen to identify the action when you left click on the item. The action corresponding to a right click is less obvious, but a quick look at the plt menu (see below) will remind you what these actions are.

You can use the 'addtag' parameter to add additional items to the bottom of the menu box. This parameter is described in the Options section.

Details about each menu box item follow

Help

On Windows systems when you left or right click on the Help tag, plt will display the file plt.chm. On Unix and other systems, the browser will be opened to display the file plt.htm (since these systems don't support the chm file format). The left click behavior may be modified by including the 'HelpFile' parameter on the command line and the right click behavior may be modified by including the 'HelpFileR' parameter. Those parameters are described here.

LinX

Left-clicking this tag changes the x-axis scale from linear to logarithmic. The name of the tag itself also toggles between LinX and LogX so that it the tag name always matches the current x-axis scaling type. Left-clicking again toggles it back to LinX.

Right-clicking this tag swaps the x and y data for all the traces which has the effect of displaying the inverse function of the original display. This swapping works best when only a single axis is being used. For multiple axes (i.e. with a right hand axis or with subplots) the effect might not quite be what you expect.

LinY

The y-axis scale changes from linear to logarithmic. This tag also changes to LogY so that it always matches the current scaling of the y-axis. Clicking again toggles it back to LinY.

Right-clicking on this tag opens the plt HardCopy dialog box which looks like this:

This dialog box was developed for older versions of Matlab which did not have much flexibility in creating hardcopy files. Now it is mostly obsolete since you can accomplish pretty much the same things from the File menu in the menu bar. But this dialog box remains since there are a few things it can do that the File menu can't (such as creating a postscript or embedded postscript file for example).

Grid

Left-clicking on the Grid tag alternates between no grids (tick marks only) and full grids on both x and y axes. By default, the grids are solid dim grey lines. (This may be modified by the GRIDc and GridStyle parameters.) Grid lines with high contrast colors and brightness (such as what you get with the native Matlab plot command) make it more difficult to observe the main data traces.

Assuming the grid style has not been modified with the GRIDc or GridStyle parameters, right-clicking on the Grid tag will alternate between the following two grid modes:

Zout

Each left click of the Zout (Zoom out) tag expands the x and y axes by 40% (20% at each end). This approximately doubles the area of the Cartesian plane displayed within the axis limits. (1.42 = 1.96). Right-clicking on the Zout reverses the effect of a left click (i.e. zooms in).

XY

Each click on the XY (XYrotate) tag cycles the x and y axis limits to the next display expansion stored in a history list. (The axis limits from the last four zooms or pans are saved in this list). After all the display limits in the history list are used, the next click autoscales both axes so that all the data is displayed. The next click again uses the first display expansion in the history list. Right-clicking on this tag skips the rotation through the history list and directly autoscales the axes to show the full x and y extent of the trace data.

Mark


When you left-click on the Mark tag, a square marker is placed at the current cursor location and a marker string is added to the plot containing the x and y coordinates of the cursor location. The text string will be the same color as the active trace. If the text label is not positioned where you want it, click on the label and drag it to the location you want.


If you right-click on the marker string (which is (7.675, 2.95902) in this example), a new dialog box will appear which allows you to change any or all of the properties of both the trace marker (with the left popup and edit box) and the marker string (with the right popup and edit box). The two pictures below show the Marker and String properties respectively that you can edit.

Note that you can have many of these Edit Marker dialog boxes open at the same time - as many as one per text string (or even more, although there is probably little benefit to that). All these dialog boxes will be deleted automatically if the main plot window is deleted.

Once you select one of the 8 marker properties (on the left), or one of the 10 string properties (on the right, the current value of the property appears in the respective edit box. To change the property value, click in the edit box, and type in a new value.

Note that both the Marker and the String popups have Delete as one of the options. This is useful if you want to add a marker without a string or a string without a marker. You may delete all the markers you have added this way by selecting Delete and then typing all into the edit box below the popup. The same trick works for deleting all the strings added to the figure via the Mark tag. If you want to delete all the markers and all the strings at once click on the Delete all cursor annotations button at the bottom of this figure. First, the button will change its name to click again if you are sure and then you can click on the button again to delete the annotations. If you clicked on that button by mistake, simply close the dialog box before clicking on the button a second time.


Note that when you select the color property for the marker or the string, the property value is a set of three numbers corresponding to red, green, and blue respectively. Each number is an intensity value and must range from zero (off) to 1.0 (full intensity). You may change the color by entering the desired rgb values. When you press <Enter> the new value will be accepted and you will see the marker or string change to the new color. However, since it is often difficult to predict exactly what these colors look like, plt provides an easier way to select new colors. Instead of left-clicking on the rgb triple, use a right click. Then a new color selection box will appear that allows you to use sliders to choose the rgb values and to see the resulting color instantly. Scroll down to the bottom of this page to read about the use of the color selection box (also called a ColorPick pseudo object).

Data

It's easier for our brains to understand (or modify) data sets graphically, especially for large data sets. This is why Matlab includes a plot command and why I developed the plt toolbox. However, occasionally it is useful to view (or modify) the data numerically, which is the purpose of the Data tag. Left-clicking this tag opens a Cursor Data Window (see below) which allows you to view and edit the plotted data numerically.

An additional use of the Data tag is to toggle the menu bar on or off. You do this by right clicking on the Data tag. (See the description of the menu bar below). Note that the initial state of the menu bar is off unless the (unless 'options','Menu' appears in the argument list).


To experiment with the Cursor Data Window, let's begin by typing pltn(3) at the command prompt. This will bring up a plot containing 3 traces. Next click on the Data tag in the Menu box, which will bring up the window you see here.

By default, there will be 25 lines in the cursor data window (24 data lines plus the first line showing the column labels). There might be fewer than 25 lines if the main figure is very short. If you want to see fewer or more lines, simply use the mouse to resize the height of the cursor data window.

The background color of the cursor data window will be the same as the background color of the plot (black in this example). If you were to click on the Data tag in the subplt8.m demo program (which uses a white plot background) then the cursor data window will also have a white background color.

Plots created using the pltpub call don't have a menu box (by default) so you can't open a cursor data window by clicking on the Data tag since it is not there. But a data window is still sometimes useful for publication-style plots so an alternate way of opening one is provided. Since the menu bar is turned on by default by pltpub you can click on the plt menu (the last menu on the menu bar) and then click on "Cursor Data Window" (or press the "c" key).

The cursor data window is not usually big enough to show all the plotted data. Only a subset of the data near the current cursor position is shown. The first column shows the index corresponding to the data in the remaining column, so in this example, the 201st data element is shown at the top and the 224th data element is shown at the bottom. The cursor position is indicated by a minus sign in front of the index, so in this example, the cursor is located on the 201st data element. The cursor position is almost always shown at the top of the figure (as it is here), except when the cursor position is near the end of the data set. So, for example, if the cursor is moved to the right end of the trace, the bottom row would have the negative index number. (This is done so that we always see as many data elements as we have room for in the cursor data window.) Try clicking around at various points of the traces and note that the data shown in the cursor data window always follows the cursor.)

If you click on the Data tag again, a second data window will appear. This can be useful (especially when editing the data) so that you can see and modify two different portions of the data at the same time. Only the 2nd cursor data window will follow the cursor while the 1st data window will continue to show the same indices. If you want the first data window to follow the cursor, then resize the data window. (The cursor will follow the last data window to be resized). You can open as many data cursor windows as you like, although much beyond two is rarely useful.

The second column (with heading "X") contains the X data and the remaining columns show the Y data for the three traces active on the plot. The colors used for the Y data are the same colors used for the plot traces. The cursor happened to be on the first trace when the data window was opened, so the X and ID01 column headings are highlighted to indicate that these represent the X and Y values of the cursored trace. If you click on the 2nd trace (ID02) on the plot, you will see that the X and ID02 column headings will be highlighted. There is only one X column in this example because the three traces happen to have the same X vector, but this will not always be the case.

You may have noticed the small pink box in the lower right corner of the cursor data window. This is used to save the data shown in the cursor data window to variables in the base workspace. This is useful when you want to perform some computation on the data shown in the window. (Perhaps computing the sum of the difference between two columns for example). If plt was called from the command window or from a script, you would already have this data in the base workspace, but if plt was called from a function (as in this example, from function pltn) the data would not be available in the base workspace.

As soon as you click on the pink box, the box changes to the blue(ish) color shown here. The color of the box is of no consequence other than to give you some visual feedback that you have successfully clicked on the box and that the workspace variables were created. If you click on the box a second time it will change back to the original color and the workspace variables will be updated to reflect the new data in the cursor data window (which may be different if you have moved the cursor, resized the window, or edited some data values, for example).

After clicking on this box, if you type who into the command window, you will see:

Your variables are:
XYindex xID01 xID02 xID03 yID01 yID02 yID03


The variables that start with "x" or "y" contain the x or y data for each of the named columns. In this example the length of xID01 (and the other variables) will be 24, although this will change if you stretch or shrink the height of the cursor data window. The first variable "XYindex" will contain the vector [201 224] indicating that the indices from 201 to 224 have been saved.

If you right click on the box instead of left clicking, you will see the same variables in the base workspace, but the lengths of these variables will be 400. (i.e. the entire trace data is saved instead of just the data within the specified indices). An alternate way of getting the full length variables into the workspace is to right click on the "Data" tag (which makes the menu bar visible) and then select the "plt save" menu option. This will create a file named "plt.plt" (or a different file name if you choose to enter one). Then you can type load plt.plt -mat and you will see two new variables called xdat and ydat in your workspace. In this example both of those variables will be length 3 cell arrays, where each element of the cell array contains the data for the ID01, ID02, and ID03 variables respectively.



In this example, the data window was created from a plot containing four traces. The first three traces happen to have the same X vector and the fourth trace has a different X vector. The cursor was on the 3rd trace (serp) when the data window was opened, so the first X column and the serp column have their headings highlighted to indicate that the cursor was on that trace. If you click on the last trace (sawtooth) then the last two column headings would be highlighted. If all four traces happened to have different X vectors, then the data window would have had 9 columns:

    index     X     humps     X     bell2     X     serp     X     sawtooth

If you click on the pink box in the lower right corner, you will find that these variables have been added to the base workspaces:

XYindex xhumps xbell2 xserp xsawtooth yhumps ybell2 yserp ysawtooth


The cursor data window only displays data for traces that are visible at the time you click on the Data tag. In this example, we have run plt5.m and then disabled all the traces except Line 3. I have zoomed the display to show the small portion of the data between x values of 3.1 and 3.9 and also have clicked the marker button (o) in the cursor button group (the 4 buttons at the lower left corner of the figure). This allows us to see the individual data elements more clearly. Then after clicking the Data tag, the display will look something like this.

Note that the cursor is on the data value with x = 3.2 and y = 3.589224. We can see these two numbers in the cursor readout edit boxes of the plt5 window as well as the top data line of the cursor data window (index = 97).

Suppose now we decide we want to modify the Y value of the data element at x = 3.3 (index 101) from its given value of 3.706158 to a new value of 3.9. To do this, we right click on the number in the cursor data window (3.706158) and then hit the backspace key until the number is gone and then type in the number 3.9 followed by the <Enter> key. As soon as you hit the Enter key, the display will look like this.

Note that the trace in the plot has been automatically updated so that it shows the new value (3.9) that we entered in the cursor data window. Also, note that the heading for the first column in the data window has changed from "index" to "index1". This indicates that we have made just one edit using the cursor data window.

If you simply wanted to make the original value bigger but were not so concerned with an exact value, you could simply left click on the number (3.706158) in the data window somewhere near the last few digits of the number (i.e. near the 1 or the 5 or the 8). After the mouse click that data element would be increased by 2 percent and would then show a value of 3.780281. Left click on this same spot again, and the data element would increase by another two percent to a value of 3.855887. In fact, you can also hold down the mouse key, and the data value will continue to increase by two percent (with a repeat rate of 33 times per second). As you continue to hold the mouse button down you will see the data element in the plot continue to rise until you let go of the mouse button. If you wanted finer control, you could change the default 2 percent change amount to a smaller amount and you can also change the repeat rate of 33 times per second to a faster or slower rate. To learn how to do either of those things, go to the
The pseudo edit object section of the manual and read the portion titled "Keyboard and mouse behavior" near the bottom of the page. Note that if instead of increasing this value, you wanted to decrease it by two percent, then you would click closer to the first few digits of the number (i.e. near the 3 or the 7 or the 0). Normally you would want to avoid clicking right in the middle of the number (near the 6 in this example) because then it would unpredictably either increase or decrease the value.

Now let's modify another y value of this same trace at index 113. Right click on the current value (3.76692), backspace to remove it and type in a new value of 3.92 and press <Enter>. The display will now look like this. As before the new value of 3.92 appears in the cursor data window and the plot has been updated, now showing both edited values. The first column heading now shows "index2" to indicate that 2 edits have been made to the original data. Also, a new graphical element has appeared in the data window ... a vertical grey bar. This will appear whenever two successive edits have been made to the same trace. Notice that the ends of the vertical bar extend from index 101 to index 113 (the two positions that have been edited). The purpose of this vertical bar (called the range bar) is to allow editing a range of points.

Suppose for a moment that the 2nd point we wanted to edit was index 124 (instead of 113). Notice that we can't see index 124 in the cursor data window which means that we would have to move the cursor before editing the desired Y value. After editing that value, the range bar will appear, but the ends of the range bar can't be positioned next to the indices that have been edited as before since both indices are not visible in the data window at the same time. In that case, the range bar will extend to the full height of the data window.

Let's now click on this range bar and observe that the display will look like the plot below.

Note that all the y values between 101 and 113 have now been edited in such a way that the points form a straight line. Of course, if you wanted all these values to contain the same number (so the line created would be horizontal), you would simply edit both endpoints to contain that same number. Note that the first column heading now shows "index3" indicating that 3 editing operations have been performed (even though more than 3 data elements have been modified).

Now suppose you wanted to Undo some or all of these edits. To do this, click once on the first column heading and note that the column heading has changed back to "index2" and the plot now looks like the display above. Click on it again and the plot looks like the display above that, and click on it a 3rd time and the plot looks like the display above that (i.e. back to the unedited data). The column heading with then show "index", verifying that the data displayed is the same as it was before any editing has been performed. If you wanted to undo all the edits without having to click once per edit, right click on the first column heading. In this example, that would have changed "index3" back to "index" undoing all the edit operations at once. There is essentially no limit to the size of the undo buffer (limited only by the size of your computer's memory).

Once we have undid all 3 edit operations, let's now experiment with the Redo feature. Click once on the second column heading (which will always be "X") and notice that the first edit has reappeared. After the 3rd click, all 3 edits will reappear and the display will again look as shown here (with the straight line between x = 3.3 and 3.6). As you might guess, right clicking on the second column heading will redo all the remaining edits that have been undone. (In this example, right clicking the second column heading has the same effect of left clicking it 3 times since 3 edits have been undone.)

So far we have only shown that you can alter trace Y values, but actually, you can similarly alter X values. For example, let's go to index 101 and right click on the X value in the 2nd column. Backspace to remove the old value (which is 3.3) and replace it with the new value 3.5. Notice that the point that was at (3.3, 3.706158) has been moved to (3.5, 3.706158). (The Y value was not changed.) In this example, the X vector for trace 3 was modified, but the X vector for the other traces was not changed because those traces were disabled. If we were to open a cursor data window when say (for example) the first 3 traces were enabled and the last 2 traces were not, then when we edit an X value, the X vector for traces 1,2, and 3 would be modified since the first column represents the X data for all 3 traces. Also, the edit count indicated by the first column heading would then increase by three indicating that edits to 3 different traces were performed. Clicking once on the column heading (the undo function) would undo this change for all three traces, and the edit count would decrease by three. On the other hand, if each trace of a plot has a different X vector, then editing an X value only modifies one trace as you would expect and the edit count only increases by one.

Another important feature of the cursor data window is that there is an alternate method of moving the cursor when a data window is open. Simply click on one of the index values in the first column and the cursor will be moved to that index. In this figure, for example, clicking on the "98" will move the cursor to index 98, essentially advancing the cursor by one point, which will move all the values in the data window up one line. (Note that the effect of this is the same as clicking on the X label (Micro-seconds) of the plot.) If instead you click on the index at the bottom of the column (118) it will move the cursor to index 118, effectively moving the cursor forward by one page of the data window. The exception to this is that if you click on the current cursor index (-97 in this example) the cursor will move to index 1 (the beginning of the trace). If you want to move the cursor faster than this, right click on the index value (for example "107" in this picture shown here), backspace to remove the current value, and type in a new cursor index. After pressing <Enter>, the cursor will be moved to the index specified (which normally will be shown at the top of the data window). To move the cursor to the end of the trace, enter a large number such as "1e9" or "inf". More often, you will find it more convenient to move the cursor by clicking on the desired position on the trace, but if the cursor controls have been removed (such as for a publication-style plot created by pltpub.m), then this alternate method for moving the cursor will be the only method available.

The last feature of the cursor data window to describe is its ability to add or remove points from the traces.

Run the plt5 demo, disable all the traces except for Line2 and Line4, and zoom the x and y axis to include the small portion of the plot shown here. Click on the "o" button in the 4 button group at the lower left corner of the figure. This enables the "marker" view of the data so we can better see each data element. Next, click the cursor on one of the points at x= 7.35, and then click on the Data tag to open the cursor data window. Now suppose we want to insert four additional points into the plot between the points at x = 7.4 (index 265) and x = 7.425 (index 266). To do this right click on index 265 in the cursor data window, backspace to remove the index number, and type in 5i. (You can think of the "i" as meaning insert.).

Then after pressing <Enter> you will see the figures shown below.

As you can see, 5 new points have been added after the point at x = 7.4 for both traces. The first column heading of the data window has changed from "index" to "index2" indicating that edits were made to two different lines.

Originally these traces contained 400 points, but if you move the cursor to near the end of the trace you will be able to see that the last index value is now 405 verifying that 5 points have been added. The three lines that were disabled (1,3,5) were not modified and still have their original 400 points. If you click on the "index2" column heading, this modification to both Line2 and Line4 will be undone and the figure will again look like it does above.

Of course, if you want to insert points in just one of the traces, all you have to do is enable only that one trace, then open a cursor data window and insert the points in the position desired.

Note that if the x spacing between points was uniform after an insert modification is done, the spacing is no longer uniform. An exception to this is if you do an insert operation on the last point of a trace. In that case, we are not inserting the new points between two existing points, but merely extending the data set to include some new points at the end. In this case, the x spacing of the new points is set to be the same as the x position between the last two points of the trace (before any points were added). This means that if the trace had uniform spacing before the insert operation, it will still have uniform spacing afterward.

Let's enable only the first 3 traces and zoom the display to the portion of the data shown here. Now suppose we want to remove the four consecutive points on each of these three traces starting at x = 1.5. To do this, open a cursor data window and right click on the index associated with x = 1.5 (index 29 in this example). Backspace to remove the index number and type in the value "-4i". (You might want to think of this as inserting negative 4 points.)

Then after pressing <Enter> you will see the figures shown below.

Note that 4 points starting at x = 1.5 have been removed from all three enable traces. If you move the cursor to near the end of the traces you could verify that these three traces now include only 396 points. The disabled traces (Line4 and Line5) will still include 400 points as before. The first column heading now shows "index3" indicating that 3 lines have been modified. If you click on the "index3" (the undo feature), all three of these edits will be undone and the figure will again look like the figure above.

You might question the value of the cursor data window since you could of course use the familiar interface of an Excel spreadsheet to edit your data. But there are several advantages of the cursor data window that would be difficult to replicate using a spreadsheet. One of these is the synchronization of the text colors used in the data window with the plot trace colors. Another is the instant updating of the plot (including the execution of any cursor callback functions defined for the plot) whenever a data point is edited in the cursor data window. Also, when you are editing a data point, instead of typing in a new number, you can type in a Matlab expression, even including Matlab function calls that you define yourself. The value of the Matlab expression will become the new data point value.

Note that all the data editing operations mentioned in this section can also be done without opening a cursor data window by using the graphical editing methods shown in the 2d data editing section. Usually, that method is easier if you wish to edit the data graphically, whereas the cursor data window is easier if you want to edit the data numerically.

Menu Bar

In most cases you won't need the menu bar when using plt, so by default, the plt figure is opened without a menu bar. However, if you find that you need the menu bar (perhaps to create a hard copy of the figure from the File menu for example), right click on the Data tag in the Menu box and the menu bar will appear. Also if 'Options','Menu' was included in the plt argument list, then the figure will be opened with the menu bar.

The first eight menus in the menu bar (File through Help) are the same menus that will appear in any figure created by Matlab. However, the last menu (plt) was added by plt and contains items useful only for figures that were created by plt. Usually, you will open the plt menu by simply clicking on it, but you can also open it by pressing the ALT key (at which point the accelerator key associated with each menu is underlined) and then pressing the "p" key.


Either way, this is what the opened plt menu looks like. Normally you will select one of these 13 submenus by simply clicking on the desired one, but this can be also done with the keyboard. Notice that there is an underlined character in parenthesis after each submenu name. This is the accelerator key. For example, to open the Cursor Data Window, you can just press the "c" key. Note that some of these submenus have some blue text after them. These are directions for selecting the submenu action without using the menu bar. Eventually, you will probably remember these directions, which will save you time since you won't have to first turn on the menu bar. For example, the Cursor Data Window can be opened from this menu, or by clicking on the Data tag in the menu box (note the menubox Data tag after the Cursor Data Window submenu.

These 13 submenus are described below:

1. plt Help

Opens the plt help system at the top level. For Windows-based systems, the compiled help file (plt.chm) is opened. If you prefer to use your browser instead of the Windows chm renderer, rename or delete the chm file. Then the file plt.htm (in the root plt folder) will be opened in the browser. plt.htm links to many other html and image files in the plt\doc folder. Non-Windows operating systems don't have a .chm reader, so they always use the browser to access the help system. This is similar to clicking on the Help tag in the menu box, however, that tag is often redirected to a subtopic of the help system instead of starting at the top level.

2. plt Save

Saves the current figure so that it can be opened later (see plt open below). A dialog box opens allowing you to choose the name of the file. A .plt extension is used for these files although they are ordinary .mat files. This menu item is equivalent to typing plt save at the Matlab command prompt. Also at the command prompt, you may type plt save filename which avoids the file dialog box by specifying the file directly and of course the functional form plt('save','filename') works also.

3. plt Open

Opens a dialog box that allows you to select a .plt figure file that was saved with the plt save menu. The new window should look and behave the same as the original plt window. (Note that if the original plt window was created with a function that provided additional plotting features to the plt window, those features will not be available after opening the figure.) This menu item is equivalent to typing plt open at the Matlab command prompt. Also at the command prompt, you may type plt open filename which avoids the file dialog box by specifying the file directly. A new window is opened containing the data that was saved.

4. plt Properties

The 4th plt submenu opens a dialog box used to edit line, cursor, or figure properties. It will usually be more convenient to open this dialog box without using the menu bar as follows. First RIGHT click on the Yaxis edit box. This will open the following popup menu:

Then clicking on the first option in this menu (Properties) will open the properties dialog box. There are two advantages of using this method to open the dialog box:
●  The first advantage is that you don't have to enable the menu bar (which will usually start out hidden).
●  The second advantage is only apparent when the traces are distributed among two or more axes. This will happen when either the subplot parameter or the Fig parameter has been used. Usually, there will be a separate Yaxis edit box for each axis containing traces. Right click on the Yaxis edit box associated with the traces or cursors you want to modify. (The dialog box only edits traces or cursors from a single axis.) When using the menu bar to open the properties dialog box you must be careful to first click on the axis containing the traces or cursors you want to modify. Otherwise, the wrong dialog box may be opened.

For example, suppose we are running the demo program subplt.m (shown here), which has 3 traces on the main (lower) plot and two more traces, each on the two subplots. Now RIGHT click on the Yedit box associated with the lower plot. That's the one to the right of the "y:" label with a green background - matching the trace color of the active cursor which is on the first trace (with the trace name "Square").


Then in the menu that opens, click on "Properties" and this dialog box will appear.

The popup menu at the top will be set to the trace that had the cursor on it, and indicates that we are prepared to edit properties of that trace as well as its cursor. If you want to edit a different trace, click on this top popup menu and you will see the choices as follows:

Note that the three trace names associated with this axis are in this list as well as "ALL LINES" which you can choose if you want to make a change that affects all the lines. (For example, when you are changing the linewidth, often you will want to change all the lines at once.)

If instead of starting by right clicking on the green Yaxis edit box, we clicked on the red one right next to it (which you can tell by its color is associated with the middle plot), then the top popup menu in the properties dialog would have been set to "Sweep" (the trace name for the trace in that axis). Also, there would be only one selection in that popup menu since that axis contains only a single trace.

Once we have selected the trace we want to modify, you can click on the popup under the Line properties: label and you can select one of these 8 line properties that you wish to modify. (See figure to the right). Or you can click on the popup under the Cursor properties: label and you can select from the same set of properties that were available for the lines. (See figure to the left).

After selecting on of these properties, the current value for this property will appear in the edit box underneath the popup menu, and then you can change the property value by clicking inside the edit box and typing in the desired change. As soon as you hit Enter, the change you made will be immediately apparent in the main figure.

You could conceivably edit the line data this way by selecting the Xdata or Ydata line property, although this isn't very practical unless the line contains no more than a few points. For longer data sets there are easier ways to edit the line data. (See the Data editing section.)

The popup menu at the bottom allows you to edit other properties that aren't directly related to the traces, such as the figure and axis colors. The eight properties that you can edit from this popup menu are shown here. As before, when you make a change in the edit box below this popup, you will immediately see the effect of that change.

When you select a color property from any of the three popup menus, you will see a color triple in the associated edit box (i.e. three numbers between 0 and 1.) If you know the color triple for the color you want to select, you can left click inside the edit box and type in the new numbers. However, it is rare to know the color triple you want and more often you won't even be sure of the color you want. So instead you can RIGHT click inside the edit box and you will be presented with a color selection box. Read "The Color Selection box" section at the bottom of this page to learn how to use it to choose the color you want.

None of the changes you make from any of these three edit boxes are permanent. So after you close the figure all of the changes are lost. Starting the program again will show the original properties that were in effect before you made any of these edits. Generally, you will use the Properties dialog box to experiment with the various properties to produce a visually appealing figure window for the application. Then the program will be edited to include the property values we have modified with the dialog box. However, there is a way to make the color scheme permanent without editing the application itself. Simply click on the Save color scheme button. For the example, we have been using above (subplt.m, clicking on that button will create a file called subpltColor.mat which contains all the properties in the bottom popup menu as well as the colors of all the traces (reflecting any changes to these colors that may have been made from the Line properties popup menu. When subplt.m is restarted, it will see this new file and use the colors that it specifies. If you want to return to the original default colors defined by the application, simply delete or rename its associated .mat color file. The color selection files created using one application can be used in another application by renaming the color file. These color files are described in more detail in the
Default colors section. Also, an application can override this behavior by using the 'ColorFile' parameter which is described in the Colors section.

5.) Cursor Data Window Rclick Menu


This submenu opens a cursor data window which is described above under the right-click action of the Menubox Menu tag.

6.) Swap X/Y axes Rclick LinX


This submenu performs the action described above under the right-click action of the Menubox LinX tag.

7.) Hardcopy Rclick LinY


This submenu menu opens a dialog box used for printing and creating screen captures of plt figures. The use of this dialog box is described above in the description of right click action of the menubox LinY tag.

8.) Hide/Show cursor controls Rclick Yaxis label


Before making a screen capture of the figure window, you may want to use this option to reduce clutter on the hardcopy.

9.) Hide/Show TraceID box


Usually, the TraceID box will be useful on a hardcopy, but sometimes it is not needed and you may want to remove it for the same reason mentioned above for the cursor controls.

10.) Toggle magnifying lens mode Rclick "o"


You can read about the lens mode in the Zooming and panning section here.

11.) Set dual cursor


The dual cursor mode allows you to simultaneously cursor two traces on the same plot. Usually this is set up using the 'DualCur' parameter. (see Dual Cursor). However, you may also use this menu to set the dual cursor interactively. Simply put the cursor on the trace that you want as the dual cursor (by clicking on it) and then select this submenu. After that, the Dual Cursor will become active on the selected trace. This submenu acts as a toggle, which means that if the dual cursor was already enabled, it will be disabled.

12.) Toggle Reposition mode Rclick Delta


The reposition mode is a key feature of plt's GUI building tool set which allows you to move and resize screen objects with the mouse. This submenu toggles between the normal GUI mode and the reposition mode and back. The repositioning mode is described in more detail in several parts of the GUI building with plt section including here, here, and here

13.) SnapTo Grid size Delta+Rclick Delta


This submenu brings up a small auxiliary figure titled SnapTo containing two sliders, one for controlling the x step size and the other for controlling the y step size of the GUI object repositioning mode. More details about the SnapTo auxiliary figure can be found in the GUi building with plt section here

The Color Selection box


When using the "Edit Marker" or "Properties" dialog boxes described above, if you right-click on an edit box containing an rgb triple, this color selection box will appear.

As with the rgb triples, the three sliders represent the intensity values (except in percent) and will initially be set to the same values that were in the edit box. You can move the sliders (or type in new values) to give the proportion of each color that you want. Only integer values between 0 and 100 are accepted giving you more than a million different colors (101 cubed). As you move the sliders, the color of the marker, line, or figure element selected is continually adjusted to reflect the slider settings. The color of the large rectangular patch to the right of the red slider (called the "current color patch")  is also adjusted at the same time which makes it easier especially for the smaller screen elements.

To make it easier to find the most pleasing color, the 11 by 11 grid of colors is also updated every time a slider is moved. What this grid shows you are the colors that result when the intensity value of the active slider is mixed with 1 of 11 different intensity values of the two inactive sliders. The active slider (i.e. the slider that was last moved) is shown highlighted in yellow.

So for example, in the figure above, the bottom slider (blue) is active and happens to be set to 0%. This means that all 121 squares of the grid are made up of colors containing no blue. Each row of the grid contains a different intensity percentage of red (0% for the bottom row, 10% for the next row, and 100% for the top row). Likewise, each column of the grid contains a different intensity percentage of green (0% for the left column and 100% for the right column). Thus, the upper right square in this example then would be yellow (rgb = [1 1 0]).

When you see a color in the grid that you like, just click on it. The screen element selected as well as the current color patch will instantly change to be the same as the color you clicked on. Of course, the two inactive sliders move to show the intensity values of the color you just selected. If you can't find a better color, you can revert to the color in effect when you right-clicked on the rgb triple by clicking on the current color patch.

All this may sound somewhat complicated, however, it is far easier to do than to explain. Generally, you can pick any of the three sliders, move it around a bit, and you will quickly see the color you want in the grid. By the way, clicking on the slider trough area moves the slider by 10%, so if you want to limit yourself to the 113 colors formed with the intensities 0,10,20,30,...100%, then you can see all 1,331 such colors by moving one of the sliders to 0 and then slowly clicking 10 times in the trough area of that slider. For more details on the color selection box, see The color pick pseudo object section.